//***************************************************
// Program FOR SEPARATION OF FFP OUT OF 3BTT  CPD and SAGM
// DDP - LUXOMATIC
// Adapted by Kevin
// 13.06.2013
// PROGRAM STEPS
// 1.SENSOR ADJUSTMENT
// 2.PLASMA SEPARATION
// 3.PLASMA SEPARATION2
// 4.ADDING SAGM
// 5.SEAL CLAMP A
// 6.SHOW MESSAGE
//***************************************************

PROGRAM=11-400ml-260ml(LDJ)
BAG_TYPE=3B-T/T
ALL_CLAMPS=ACD

PLACE=1;	LIQ=??????;	CLAMP=A;	NET=(TOTAL-30)/1.06;	SHOULDREAD=1;		PROGCODE=41;        
PLACE=3;        LIQ=???;	CLAMP=D;	NET=(TOTAL-25)/1.03;	SHOULDREAD=1;	
PLACE=5;	LIQ=????;	CLAMP=C;	SHOULDREAD=0;

PROG_MENUS=SB;
MB_WEIGHT=30

BEGIN_PROG_ON_START
	DO_CLAMPS=CLOSE
	DO_PRESS_A=BCK
	DO_PRESS_B=NOTHING
END_PROG_ON_START
BEGIN_PROG_ON_FINISH
	DO_CLAMPS=OPEN
	DO_PRESS_A=MIDDLE
	DO_PRESS_B=NOTHING
END_PROG_ON_FINISH
BEGIN

	PROGRAM_STEP=??????
	BEGIN
		SOURCE_PLACE=1
		DEST_PLACE=3
		ACTIVE_CLAMPS=AD
		SOURCE_LIQ=WHOLE_BLOOD
		DEST_LIQ=PLASMA
		TIMEOUT=60000
		TIME_TO_STABLE=1000
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=FWD
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
			LEARNING_SENSOR=MUX
		END_ON_FINISH
		BEGIN_REG_COND
			TYPE=V
			NAME=B3
			VALUE=90
		END_REG_COND
	END_STEP

	PROGRAM_STEP=???????1
	BEGIN
		SOURCE_PLACE=1
		DEST_PLACE=3
		ACTIVE_CLAMPS=AD
		SOURCE_LIQ=WHOLE_BLOOD
		DEST_LIQ=PLASMA
		//FLOW_CONTROL
		//REF_FLOW=777721
		TIMEOUT=180000
		TIME_TO_STABLE=2000
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=FWD
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_REG_COND
			TYPE=&
			NAME=SENSORS
			VALUE=M1&M2
		END_REG_COND
	END_STEP

	PROGRAM_STEP=???????2
	BEGIN
		SOURCE_PLACE=1
		DEST_PLACE=3
		ACTIVE_CLAMPS=AD
		SOURCE_LIQ=WHOLE_BLOOD
		DEST_LIQ=PLASMA
		FLOW_CONTROL
		REF_FLOW=2.0
		TIMEOUT=180000
		TIME_TO_STABLE=0
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=FWD
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_PRESS_A=MIDDLE
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_REG_COND
			TYPE=&
			NAME=SENSORS
			VALUE=M1&E1
		END_REG_COND
		BEGIN_REG_COND
			TYPE=&
			NAME=SENSORS
			VALUE=M1&E2
		END_REG_COND
		BEGIN_REG_COND
			TYPE=W
			NAME=B3
			VALUE=8
		END_REG_COND
	END_STEP

	PROGRAM_STEP=???
	BEGIN
		SOURCE_PLACE=5
		DEST_PLACE=3
		ACTIVE_CLAMPS=CD
		SOURCE_LIQ=SAGM
		DEST_LIQ=WHOLE_BLOOD
		//HIGH_PRESSURE
		TIMEOUT=80000
		TIME_TO_STABLE=0
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=CLOSE
			DO_PRESS_A=BCK
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=4000
		END_REG_COND
	END_STEP

	PROGRAM_STEP=??C???
	BEGIN
		SOURCE_PLACE=5
		DEST_PLACE=3
		ACTIVE_CLAMPS=C
		SOURCE_LIQ=SAGM
		DEST_LIQ=WHOLE_BLOOD
		//HIGH_PRESSURE
		TIMEOUT=80000
		TIME_TO_STABLE=0
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=STOP
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=OPEN
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=2500
		END_REG_COND
	END_STEP

	PROGRAM_STEP=????
	BEGIN
		SOURCE_PLACE=5
		DEST_PLACE=3
		ACTIVE_CLAMPS=D
		SOURCE_LIQ=SAGM
		DEST_LIQ=WHOLE_BLOOD
		//HIGH_PRESSURE
		TIMEOUT=80000
		TIME_TO_STABLE=0
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=300
		END_REG_COND
	END_STEP

	PROGRAM_STEP=???????
	BEGIN
		SOURCE_PLACE=5
		DEST_PLACE=1
		ACTIVE_CLAMPS=AC
		SOURCE_LIQ=SAGM
		DEST_LIQ=WHOLE_BLOOD
		TIMEOUT=600000
		TIME_TO_STABLE=1000
		WAIT_TO_CHECKS_CONDS=0
		SAGMD=1200
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=BCK
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=OPEN
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_FAIL_COND
		END_FAIL_COND
		BEGIN_REG_COND
		END_REG_COND
	END_STEP

	PROGRAM_STEP=ADDING SAGM
	BEGIN
		SOURCE_PLACE=5
		DEST_PLACE=1
		ACTIVE_CLAMPS=AC
		SOURCE_LIQ=SAGM
		DEST_LIQ=WHOLE_BLOOD
		//HIGH_PRESSURE
		TIMEOUT=80000
		TIME_TO_STABLE=0
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=BCK
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_PRESS_A=MIDDLE
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		//BEGIN_FAIL_COND
		//END_FAIL_COND
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=5000
		END_REG_COND
	END_STEP

	PROGRAM_STEP=???A
	BEGIN
		ACTIVE_CLAMPS=ACD
		TIMEOUT=8000
		BEGIN_ON_START
			DO_CLAMPS=CLOSE
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=NOTHING
			DO_SEAL=A
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_FAIL_COND
		END_FAIL_COND
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=0
		END_REG_COND
	END_STEP

	PROGRAM_STEP=11-400ml-260ml(LDJ)
	BEGIN
		SHOW_MESSAGE=??(???)???????????????鱣???????????????????????
		ACTIVE_CLAMPS=A
		TIMEOUT=5000
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=NOTHING
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=0
		END_REG_COND
	END_STEP

	PROGRAM_STEP=11-400ml-260ml(LDJ)
	BEGIN
		SHOW_MESSAGE=?????????????????????
		ACTIVE_CLAMPS=A
		TIMEOUT=5000
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=NOTHING
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=0
		END_REG_COND
	END_STEP

	PROGRAM_STEP=OPEN ACD
	BEGIN
		ACTIVE_CLAMPS=ACD
		TIMEOUT=8000
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=NOTHING
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_FAIL_COND
		END_FAIL_COND
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=0
		END_REG_COND
	END_STEP

END_PROGRAM